from motor.motor_asyncio import AsyncIOMotorClient, AsyncIOMotorDatabase

class MongoDBer(AsyncIOMotorDatabase):

    def __init__(self, uri):
        assert isinstance(uri, str)
        connection = AsyncIOMotorClient(uri)
        database = uri.split('/')[-1].split('?')[0]
        super(MongoDBer, self).__init__(connection, database)